package br.ufrj.dcc.ad;

import java.util.List;

import br.ufrj.dcc.ad.model.RandomGenerator;

public class Util {
	
	public static double convertSecondsToMillis(Double seconds) {
		return seconds * 1000;
	}
	
	public static double convertMillisToSeconds(Double millis) {
		return millis / 1000;
	}
	
	public static double[] convertoDoubleToArray(List<Double> doubles) {
		double[] array = new double[doubles.size()];
		for (int i = 0; i < doubles.size(); i++) {
			array[i] = doubles.get(i).doubleValue();
		}
		return array;
	}
	
	public static double getUniformalTime(double range) {
		return range * RandomGenerator.nextDouble();
	}

}
